package com.luckcoder.relax.games.domain.vo;

import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import com.luckcoder.relax.games.domain.RelaxGameLeaderboard;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;


/**
 * 游戏排行榜视图对象 relax_game_leaderboard
 *
 * @author zhanghao
 * @date 2025-09-10
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = RelaxGameLeaderboard.class)
public class RelaxGameLeaderboardVo implements Serializable {
    
    @Serial
    private static final long serialVersionUID = 1L;
    
    /**
     * 排行ID
     */
    @ExcelProperty(value = "排行ID")
    private Long rankId;
    
    /**
     * 用户ID
     */
    @ExcelProperty(value = "用户ID")
    private Long userId;
    
    /**
     * 游戏ID
     */
    @ExcelProperty(value = "游戏ID")
    private Long gameId;
    
    /**
     * 游戏编码
     */
    @ExcelProperty(value = "游戏编码")
    private String gameCode;
    
    /**
     * 最高分数
     */
    @ExcelProperty(value = "最高分数")
    private Long bestScore;
    
    /**
     * 累计分数
     */
    @ExcelProperty(value = "累计分数")
    private Long totalScore;
    
    /**
     * 游戏次数
     */
    @ExcelProperty(value = "游戏次数")
    private Long playCount;
    
    /**
     * 累计时长（秒）
     */
    @ExcelProperty(value = "累计时长", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "秒=")
    private Long totalTime;
    
    /**
     * 平均分数
     */
    @ExcelProperty(value = "平均分数")
    private Long avgScore;
    
    /**
     * 排行类型（daily日榜、weekly周榜、monthly月榜、all总榜）
     */
    @ExcelProperty(value = "排行类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "d=aily日榜、weekly周榜、monthly月榜、all总榜")
    private String rankType;
    
    /**
     * 排行周期（格式：2024-01、2024-W01、2024-01-01）
     */
    @ExcelProperty(value = "排行周期", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "格=式：2024-01、2024-W01、2024-01-01")
    private String rankPeriod;
    
    /**
     * 最后游戏时间
     */
    @ExcelProperty(value = "最后游戏时间")
    private Date lastPlayTime;
    
    
}
